<template>
    <el-dialog
      title="提示"
      v-model="showConfirm"
      width="30%"
    >
      <span>{{Title}}</span>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="cancel">取 消</el-button>
          <el-button type="primary" @click="submit"
            >确 定</el-button
          >
        </span>
      </template>
    </el-dialog>
</template>

<script>
import { reactive } from 'vue'
export default {
    props:{
        Title:{
            type:String,
            default:"默认标题"
        },
        showConfirm:{
          type:Boolean,
          default:false
        }
    },
    setup(props,context){
        let state = reactive({
            isShow:false
        })
        //取消
        function cancel(){
            context.emit('close',false)
        }
        //提交
        function submit(){
            context.emit('confirm',false)
        }

        return {
            state,
            cancel,
            submit
        }

    }

}
</script>

<style>

</style>